#include "process.h"

#define num 101

void processon(){
    int cnt  = 0;
    char bar[num];
    memset(bar,'\0',sizeof(bar));//初始化为0
                                 //
    const char* lable = "|\\-/";//旋转的图标



    //101 times
    while(cnt <= 100){
        printf("[%-100s][%d%%][%c]\r",bar,cnt,lable[cnt%4]);
        fflush(stdout);
        bar[cnt++] = STYLE;
        usleep(50000);
    }
    printf("\n");
}
